package com.djx.service.TTL_direct;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;


/**
 * @ClassName TTLDirectEWeChatQueueConsumer
 * @Date 2021/6/9 0009 上午 8:55
 * @Author Administrator
 * @Description TODO
 * Version 1.0
 */
@Component
//@RabbitListener(bindings = @QueueBinding(
//        value = @Queue(value = "TTL_weChat_direct_queue",durable = "true",autoDelete = "false"),
//        exchange = @Exchange(value = "TTL_direct_exchange",type = ExchangeTypes.DIRECT),
//        key = "weChat"
//))
@RabbitListener(queues = "TTL_weChat_direct_queue")
public class TTLDirectEWeChatQueueConsumer {

    @RabbitHandler
    public  void getMessage(String message){
        System.out.println("TTL_weChat_direct_queue接收的消息为："+message);
    }
}
